package com.itbaizhan.controller;

import com.itbaizhan.service.IMessageProvider;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author spf
 * @date 2024/2/18
 * @time 21:15
 */
@RestController
public class SendMessageController {

    @Autowired
    private IMessageProvider iMessageProvider;

    @GetMapping("/send")
    public String sendMessage(@RequestParam("message") String message){
        return iMessageProvider.send(message);
    }

    @GetMapping("/group")
    public String group(@RequestParam("message") String message){
        return iMessageProvider.sendGroup(message);
    }

}
